package com.ykh.mybbsdemo.controller;

import com.ykh.mybbsdemo.dao.pojo.vo.Result;
import com.ykh.mybbsdemo.service.CategoryService;
import com.ykh.mybbsdemo.service.VideoCategoryService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2023-11-03
 * Time: 17:27
 */
@RestController
@RequestMapping("/video/categorys")
public class VideoCategoryController {

    @Autowired
    private VideoCategoryService videoCategoryService;

    //查询所有视频分类
    @ApiOperation("获取所有视频分类")
    @GetMapping("all")
    public Result categoriesDetail(){
        return Result.success(videoCategoryService.findAll());
    }
}
